<template>
  <div class="admin-dashboard">
    <h2>管理员页面</h2>
    <button @click="manageAnnouncements">公告管理</button>
    <button @click="manageActivities">活动管理</button>
    <button @click="manageBlogs">博客管理</button>
    <button @click="manageUsers">用户管理</button>
    <button @click="logout" class="logout-button">退出</button>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const manageAnnouncements = () => {
  console.log('管理公告功能待实现');
}

const manageActivities = () => {
  console.log('管理活动功能待实现');
}

const manageBlogs = () => {
  console.log('管理博客功能待实现');
}

const manageUsers = () => {
  console.log('管理用户功能待实现');
}

const logout = () => {
  router.push('/');
}
</script>

<style scoped>
.admin-dashboard {
  background-color: #ffffff;
  padding: 20px;
}
.admin-dashboard h2 {
  margin-left: 6px;
}
.admin-dashboard button {
  margin-left: 40px;
  padding: 10px 15px;
  margin-top: 15px;
  border: none;
  border-radius: 5px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}
.admin-dashboard button:hover {
  background-color: #0056b3;
}
.logout-button {
  
  background-color: #dc3545;
}
.logout-button:hover {
  background-color: #c82333;
}
</style> 